package example;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.*;

@Aspect
public class LogAspect {
    @Pointcut("execution(* *.main(..))")
    public void log() {
    }
    @Before("log()")
    public void logBefore(JoinPoint joinPoint) {
        System.out.println("before method execution");
    }
    @AfterReturning("log()")
    public void logAfterReturning(JoinPoint joinPoint) {
        System.out.println("afterReturning method execution");
    }
}
